package com.yao.service;

import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
import org.apache.rocketmq.spring.core.RocketMQListener;
import org.springframework.stereotype.Component;

@Component
@RocketMQMessageListener(consumerGroup = "${rocketmq.consumer.group}", topic = "${rocketmq.consumer.topic}")
public class Consumer implements RocketMQListener {
    @Override
    public void onMessage(Object message) {
        System.out.println("Consumer : " + message);
    }
}